package com.seanLab.tool.es;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.seanLab.domain.TagInfo;

import java.io.Serializable;

/**
 * Created by ailly on 17-8-26.
 */
public class ESTagInfo implements Serializable {
    @JsonProperty("tag_id")
    private String tagID;
    @JsonProperty("tag_name")
    private String tagName;
    @JsonProperty("tag_source")
    private String tagSource;
    @JsonProperty("tag_score")
    private double tagScore;

    public ESTagInfo() {
    }

    public ESTagInfo(String tagID, String tagName, String tagSource, double tagScore) {
        this.tagID = tagID;
        this.tagName = tagName;
        this.tagSource = tagSource;
        this.tagScore = tagScore;
    }

    public String getTagID() {
        return tagID;
    }

    public void setTagID(String tagID) {
        this.tagID = tagID;
    }

    public String getTagName() {
        return tagName;
    }

    public void setTagName(String tagName) {
        this.tagName = tagName;
    }

    public String getTagSource() {
        return tagSource;
    }

    public void setTagSource(String tagSource) {
        this.tagSource = tagSource;
    }

    public double getTagScore() {
        return tagScore;
    }

    public void setTagScore(double tagScore) {
        this.tagScore = tagScore;
    }

    public static ESTagInfo turntoESTagInfo(TagInfo tagInfo){
        ESTagInfo esTagInfo=new ESTagInfo();
        esTagInfo.tagID=tagInfo.getTagID();
        esTagInfo.tagName=tagInfo.getTagName();
        esTagInfo.tagSource=tagInfo.getTagSource();
        esTagInfo.tagScore=tagInfo.getTagScore();
        return esTagInfo;
    }

}
